{% extends 'GlpmrQuizzBundle:Layout:layout.html.twig' %}

{% block body %}
    <div class="row">
        <h1>Ajouter un Quizz</h1>
    </div>
    <br />

    {% if ajout is defined and ajout == "ok" %}
        <div class="row">
            <span class="label label-success">Quizz correctement ajout&eacute;</span>
        </div><br />
    {% endif %}

    {% if form is defined %}
        <div class="row form">
            {{ form_start(form) }}
            {{ form_errors(form) }}

            <div class="col m6 s12">
                {{ form_row(form.titre) }}
            </div>
            <div class="col m6 s12">
                {{ form_row(form.promotion) }}
            </div>

            <div class="col s12">
                {{ form_row(form.description) }}
            </div>
            {#{% block checkbox_widget %}
                {% spaceless %}#}
                    <div class="col s12">
                        <input type="checkbox" id="form_etat" name="etat"/>
                        <label for="form_etat"> : Etat (visible aux utilisateurs)</label>
                    </div>
                {#{% endspaceless %}
            {% endblock checkbox_widget %}#}
                {{ form_rest(form) }}

            <div class="col s6 offset-s4">
                <button type="submit" class="btn blue-grey darken-4">Valider</button>
            </div>
        </form>
        </div>
    {% endif %}
{% endblock %}